package com.wondersgroup.fjzlpt.org.controller.rest.yljgxx;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.quick.framework.util.QuickPrincipalUtils;
import com.wondersgroup.fjzlpt.org.util.ControllerCommonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.quick.framework.boot.web.utils.RequestUtils;
import com.wondersgroup.fjzlpt.org.service.inter.yljgxx.YljgxxService;

@RestController
@RequestMapping("yljgxx")
public class YljgxxRestController {

	@Autowired
	private YljgxxService yljgxxService;
	
	/**
	 * 分页查询
	 * @param request
	 * @return
	 */
	@RequestMapping("/queryPage")
	public JSONObject queryPageYljgxx(HttpServletRequest request)
	{
		Map<String, String> map = RequestUtils.GetParameterMap(request);
		ControllerCommonUtil.pageFormat(map);
		String PTJGID = QuickPrincipalUtils.getPtjgID(request);
		map.put("YLJGID_this", PTJGID);
		return yljgxxService.queryPage(map);
	}
	
	/**
	 * 根据条件查询所有医疗机构
	 * @param request
	 * @return
	 */
	@RequestMapping("/queryList")
	public JSONArray queryList(HttpServletRequest request)
	{
		Map<String, String> map = RequestUtils.GetParameterMap(request);
		return yljgxxService.queryList(map);
	}
	
	/**
	 * 分页查询科室信息
	 * @param request
	 * @return
	 */
	@RequestMapping("/queryPageByKs")
	public JSONObject queryPageByKs(HttpServletRequest request)
	{
		Map<String, String> map = RequestUtils.GetParameterMap(request);
		ControllerCommonUtil.pageFormat(map);
		return yljgxxService.queryPageByKs(map);
	}
	
}



























